//
//  WisPersonalViewController.m
//  CityFire
//
//  Created by  androidlongs on 2017/10/27.
//  Copyright © 2017年 刘养柱. All rights reserved.
//

#import "WisPersonalViewController.h"

@interface WisPersonalViewController ()


@property(nonatomic,strong) UIScrollView *scrollView;
@property(nonatomic,strong) UITextView *fireLabel2;
@property(nonatomic,strong) UITextView *dutyTextView;

@property(nonatomic,strong)UITextView *workLevelLabel2;
@property(nonatomic,strong)UITextView *workOrderLabel2;
@property(nonatomic,strong)UITextView *userClassLabel;
@property(nonatomic,strong)UITextView *ssqClassLabel;
@property(nonatomic,strong)UITextView *addresClassLabel;

@property(nonatomic,strong)UITextView *workName1TextView;
@property(nonatomic,strong)UITextView *workName2TextView;
@property(nonatomic,strong)UITextView *workName3TextView;

@property(nonatomic,strong)UITextView *workPort1TextView;
@property(nonatomic,strong)UITextView *workPort2TextView;
@property(nonatomic,strong)UITextView *workPort3TextView;


@property(nonatomic,strong)UITextView *workMob1TextView;
@property(nonatomic,strong)UITextView *workMob2TextView;
@property(nonatomic,strong)UITextView *workMob3TextView;

@end

@implementation WisPersonalViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self initView];
}

- (void) initView{
    
    self.title = @"个人信息";
    
    //1. 建立UIScrollView窗口，我们只打算用手机的上半屏显示图像，(这一步也可以在storyboard里完成)
    self.scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, mainW , mainH)];
    [self.scrollView setBackgroundColor:[UIColor colorWithHexString:@"#fafafa"]];
    //add child view start
    
    UIView *nameUIView =[[UIView alloc]initWithFrame:CGRectMake(0,10,mainW,44)];
    [nameUIView setBackgroundColor:[UIColor whiteColor]];
    
    UILabel *nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, 60, 44)];
    [nameLabel setTextColor:[UIColor blackColor]];
    [nameLabel setFont:[UIFont systemFontOfSize:16]];
    [nameLabel setText:@"姓名:"];
    [nameUIView addSubview:nameLabel];
    
    UILabel *nameLabel2 = [[UILabel alloc]initWithFrame:CGRectMake(70, 0, 300, 44)];
    [nameLabel2 setTextColor:[UIColor grayColor]];
    [nameLabel2 setFont:[UIFont systemFontOfSize:14]];
    [nameLabel2 setText:self.personInfoModel.chnUserName];
    [nameUIView addSubview:nameLabel2];
    
    [self.scrollView addSubview: nameUIView];
    
    
    
    UIView *fireUIView =[[UIView alloc]initWithFrame:CGRectMake(0,56,mainW,44)];
    [fireUIView setBackgroundColor:[UIColor whiteColor]];
    
    UILabel *fireLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, 110, 44)];
    [fireLabel setTextColor:[UIColor blackColor]];
    [fireLabel setFont:[UIFont systemFontOfSize:16]];
    [fireLabel setText:@"防火负责人:"];
    [fireUIView addSubview:fireLabel];
    
    UITextView *fireLabel2 = [[UITextView alloc]initWithFrame:CGRectMake(120, 5, 300, 40)];
    [fireLabel2 setTextColor:[UIColor grayColor]];
    
    [fireLabel2 setFont:[UIFont systemFontOfSize:14]];
    [fireLabel2 setText:self.personInfoModel.fhzrr];
    self.fireLabel2 =fireLabel2;
    [fireUIView addSubview:fireLabel2];
    
    [self.scrollView addSubview: fireUIView];
    
    
    UIView *dutyUIView =[[UIView alloc]initWithFrame:CGRectMake(0,102,mainW,44)];
    [dutyUIView setBackgroundColor:[UIColor whiteColor]];
    UILabel *dutyLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, 60, 44)];
    [dutyLabel setTextColor:[UIColor blackColor]];
    [dutyLabel setFont:[UIFont systemFontOfSize:16]];
    [dutyLabel setText:@"职务:"];
    [dutyUIView addSubview:dutyLabel];
    
    UITextView *dutyTextView  = [[UITextView alloc]initWithFrame:CGRectMake(70, 5, 100, 40)];
    [dutyTextView setTextColor:[UIColor grayColor]];
    
    [dutyTextView setFont:[UIFont systemFontOfSize:14]];
    [dutyTextView setText:self.personInfoModel.duty];
    self.dutyTextView =dutyTextView;
    [dutyUIView addSubview:dutyTextView];
    
    UIView *dutyDiviUIView  = [[UIView alloc]initWithFrame:CGRectMake(180, 10, 2, 24)];
    [dutyDiviUIView setBackgroundColor:[UIColor colorWithHexString:@"#fafafa"]];
    [dutyUIView addSubview:dutyDiviUIView];
    
    UILabel *dutyCountLabel = [[UILabel alloc]initWithFrame:CGRectMake(183, 0, 60, 44)];
    [dutyCountLabel setTextColor:[UIColor blackColor]];
    [dutyCountLabel setFont:[UIFont systemFontOfSize:16]];
    [dutyCountLabel setText:@"工号:"];
    [dutyUIView addSubview:dutyCountLabel];
    
    UILabel *dutyCountValueLabel =[[UILabel alloc]initWithFrame:CGRectMake(248, 0, 100, 44)];
    [dutyCountValueLabel setTextColor:[UIColor grayColor]];
    [dutyCountValueLabel setFont:[UIFont systemFontOfSize:14]];
    [dutyCountValueLabel setText:self.personInfoModel.userID];
    [dutyUIView addSubview:dutyCountValueLabel];
    
    [self.scrollView addSubview: dutyUIView];
    
    
    
    
    UIView *workLevelUIView =[[UIView alloc]initWithFrame:CGRectMake(0,148,mainW,44)];
    [workLevelUIView setBackgroundColor:[UIColor whiteColor]];
    
    UILabel *workLevelLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, 110, 44)];
    [workLevelLabel setTextColor:[UIColor blackColor]];
    [workLevelLabel setFont:[UIFont systemFontOfSize:16]];
    [workLevelLabel setText:@"岗位级别:"];
    [workLevelUIView addSubview:workLevelLabel];
    
    UITextView *workLevelLabel2 = [[UITextView alloc]initWithFrame:CGRectMake(120, 5, 300, 40)];
    [workLevelLabel2 setTextColor:[UIColor grayColor]];
    
    [workLevelLabel2 setFont:[UIFont systemFontOfSize:14]];
    [workLevelLabel2 setText:self.personInfoModel.stationLevel];
    self.workLevelLabel2 =workLevelLabel2;
    [workLevelUIView addSubview:workLevelLabel2];
    
    [self.scrollView addSubview: workLevelUIView];
    
    
    UIView *workOrderUIView =[[UIView alloc]initWithFrame:CGRectMake(0,194,mainW,44)];
    [workOrderUIView setBackgroundColor:[UIColor whiteColor]];
    
    UILabel *workOrderLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, 110, 44)];
    [workOrderLabel setTextColor:[UIColor blackColor]];
    [workOrderLabel setFont:[UIFont systemFontOfSize:16]];
    [workOrderLabel setText:@"机构内排序:"];
    [workOrderUIView addSubview:workOrderLabel];
    
    UITextView *workOrderLabel2 = [[UITextView alloc]initWithFrame:CGRectMake(120, 5, 300, 40)];
    [workOrderLabel2 setTextColor:[UIColor grayColor]];
    
    [workOrderLabel2 setFont:[UIFont systemFontOfSize:14]];
    [workOrderLabel2 setText:self.personInfoModel.numinDept];
    self.workOrderLabel2 = workOrderLabel2;
    [workOrderUIView addSubview:workOrderLabel2];
    
    [self.scrollView addSubview: workOrderUIView];
    
    
    
    UIView *userClassUIView =[[UIView alloc]initWithFrame:CGRectMake(0,248,mainW,44)];
    [userClassUIView setBackgroundColor:[UIColor whiteColor]];
    
    UILabel *userClassLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, 110, 44)];
    [userClassLabel setTextColor:[UIColor blackColor]];
    [userClassLabel setFont:[UIFont systemFontOfSize:16]];
    [userClassLabel setText:@"用户类别:"];
    [userClassUIView addSubview:userClassLabel];
    
    UITextView *userClassLabel2 = [[UITextView alloc]initWithFrame:CGRectMake(120, 5, 300, 40)];
    [userClassLabel2 setTextColor:[UIColor grayColor]];
    
    [userClassLabel2 setFont:[UIFont systemFontOfSize:14]];
    [userClassLabel2 setText:self.personInfoModel.USERTYPE];
    self.userClassLabel=userClassLabel2;
    [userClassUIView addSubview:userClassLabel2];
    
    [self.scrollView addSubview: userClassUIView];
    
    UIView *ssqUIView =[[UIView alloc]initWithFrame:CGRectMake(0,294,mainW,44)];
    [ssqUIView setBackgroundColor:[UIColor whiteColor]];
    
    UILabel *ssqClassLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, 110, 44)];
    [ssqClassLabel setTextColor:[UIColor blackColor]];
    [ssqClassLabel setFont:[UIFont systemFontOfSize:16]];
    [ssqClassLabel setText:@"所属辖区:"];
    [ssqUIView addSubview:ssqClassLabel];
    
    UITextView *ssqClassLabel2 = [[UITextView alloc]initWithFrame:CGRectMake(120, 5, 300, 40)];
    [ssqClassLabel2 setTextColor:[UIColor grayColor]];
    
    [ssqClassLabel2 setFont:[UIFont systemFontOfSize:14]];
    [ssqClassLabel2 setText:self.personInfoModel.ssxq];
    self.ssqClassLabel=ssqClassLabel2;
    [ssqUIView addSubview:ssqClassLabel2];
    
    [self.scrollView addSubview: ssqUIView];
    
    UIView *addresUIView =[[UIView alloc]initWithFrame:CGRectMake(0,340,mainW,44)];
    [addresUIView setBackgroundColor:[UIColor whiteColor]];
    
    UILabel *addresClassLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, 110, 44)];
    [addresClassLabel setTextColor:[UIColor blackColor]];
    [addresClassLabel setFont:[UIFont systemFontOfSize:16]];
    [addresClassLabel setText:@"用户地址:"];
    [addresUIView addSubview:addresClassLabel];
    
    UITextView *addresClassLabel2 = [[UITextView alloc]initWithFrame:CGRectMake(120, 5, 300, 40)];
    [addresClassLabel2 setTextColor:[UIColor grayColor]];
    
    [addresClassLabel2 setFont:[UIFont systemFontOfSize:14]];
    [addresClassLabel2 setText:self.personInfoModel.address];
    self.addresClassLabel = addresClassLabel2;
    [addresUIView addSubview:addresClassLabel2];
    
    [self.scrollView addSubview: addresUIView];
    
    
    UIView *contactUIView =[[UIView alloc]initWithFrame:CGRectMake(0,394,mainW,44)];
    [contactUIView setBackgroundColor:[UIColor whiteColor]];
    
    UILabel *contactClassLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, 110, 44)];
    [contactClassLabel setTextColor:[UIColor blackColor]];
    [contactClassLabel setFont:[UIFont systemFontOfSize:16]];
    [contactClassLabel setText:@"联系人"];
    [contactUIView addSubview:contactClassLabel];
    [self.scrollView addSubview: contactUIView];
    
    //work1
    UIView *work1UIView =[[UIView alloc]initWithFrame:CGRectMake(0,448,mainW,44)];
    [work1UIView setBackgroundColor:[UIColor whiteColor]];
    
    UILabel *work1Label = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, 110, 44)];
    [work1Label setTextColor:[UIColor blackColor]];
    [work1Label setFont:[UIFont systemFontOfSize:16]];
    [work1Label setText:@"职位一:"];
    [work1UIView addSubview:work1Label];
    
    UITextView *work1Label2 = [[UITextView alloc]initWithFrame:CGRectMake(120, 5, 300, 40)];
    [work1Label2 setTextColor:[UIColor grayColor]];
    
    [work1Label2 setFont:[UIFont systemFontOfSize:14]];
    [work1Label2 setText:self.personInfoModel.post1];
    self.workPort1TextView =work1Label2;
    [work1UIView addSubview:work1Label2];
    
    [self.scrollView addSubview: work1UIView];
    
    
    UIView *work1ChiledUIView =[[UIView alloc]initWithFrame:CGRectMake(0,494,mainW,44)];
    [work1ChiledUIView setBackgroundColor:[UIColor whiteColor]];
    UILabel *work1ChildLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, 40, 44)];
    [work1ChildLabel setTextColor:[UIColor blackColor]];
    [work1ChildLabel setFont:[UIFont systemFontOfSize:16]];
    [work1ChildLabel setText:@"姓名:"];
    [work1ChiledUIView addSubview:work1ChildLabel];
    
    UITextView *workChiledTextView  = [[UITextView alloc]initWithFrame:CGRectMake(50, 5, 100, 40)];
    [workChiledTextView setTextColor:[UIColor grayColor]];
    
    [workChiledTextView setFont:[UIFont systemFontOfSize:14]];
    [workChiledTextView setText:self.personInfoModel.name1];
    self.workName1TextView = workChiledTextView;
    [work1ChiledUIView addSubview:workChiledTextView];
    
    UIView *work1ChildDiviUIView  = [[UIView alloc]initWithFrame:CGRectMake(160, 10, 2, 24)];
    [work1ChildDiviUIView setBackgroundColor:[UIColor colorWithHexString:@"#fafafa"]];
    [work1ChiledUIView addSubview:work1ChildDiviUIView];
    
    UILabel *work1ChildMobleLabel = [[UILabel alloc]initWithFrame:CGRectMake(163, 0, 80, 44)];
    [work1ChildMobleLabel setTextColor:[UIColor blackColor]];
    [work1ChildMobleLabel setFont:[UIFont systemFontOfSize:16]];
    [work1ChildMobleLabel setText:@"联系电话:"];
    [work1ChiledUIView addSubview:work1ChildMobleLabel];
    
    UITextView *work1ChildMobleInput =[[UITextView alloc]initWithFrame:CGRectMake(234, 5, 140, 38)];
    [work1ChildMobleInput setTextColor:[UIColor grayColor]];
    [work1ChildMobleInput setFont:[UIFont systemFontOfSize:14]];
    NSLog(@"moble is %@ ",self.personInfoModel.tel1);
    [work1ChildMobleInput setText:self.personInfoModel.tel1];
    self.workMob1TextView=work1ChildMobleInput;
    [work1ChiledUIView addSubview:work1ChildMobleInput];
    
    [self.scrollView addSubview: work1ChiledUIView];
    
    
    //work2
    UIView *work2UIView =[[UIView alloc]initWithFrame:CGRectMake(0,548,mainW,44)];
    [work2UIView setBackgroundColor:[UIColor whiteColor]];
    
    UILabel *work2Label = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, 110, 44)];
    [work2Label setTextColor:[UIColor blackColor]];
    [work2Label setFont:[UIFont systemFontOfSize:16]];
    [work2Label setText:@"职位二:"];
    [work2UIView addSubview:work2Label];
    
    UITextView *work2Label2 = [[UITextView alloc]initWithFrame:CGRectMake(120, 5, 300, 40)];
    [work2Label2 setTextColor:[UIColor grayColor]];
    [work2Label2 setFont:[UIFont systemFontOfSize:14]];
    [work2Label2 setText:self.personInfoModel.post2];
    self.workPort2TextView =work2Label2;
    [work2UIView addSubview:work2Label2];
    
    [self.scrollView addSubview: work2UIView];
    
    
    UIView *work2ChiledUIView =[[UIView alloc]initWithFrame:CGRectMake(0,594,mainW,44)];
    [work2ChiledUIView setBackgroundColor:[UIColor whiteColor]];
    UILabel *work2ChildLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, 40, 44)];
    [work2ChildLabel setTextColor:[UIColor blackColor]];
    [work2ChildLabel setFont:[UIFont systemFontOfSize:16]];
    [work2ChildLabel setText:@"姓名:"];
    [work2ChiledUIView addSubview:work2ChildLabel];
    
    UITextView *work2ChiledTextView  = [[UITextView alloc]initWithFrame:CGRectMake(50, 5, 100, 40)];
    [work2ChiledTextView setTextColor:[UIColor grayColor]];
    
    [work2ChiledTextView setFont:[UIFont systemFontOfSize:14]];
    [work2ChiledTextView setText:self.personInfoModel.name2];
    self.workName2TextView = work2ChiledTextView;
    [work2ChiledUIView addSubview:work2ChiledTextView];
    
    UIView *work2ChildDiviUIView  = [[UIView alloc]initWithFrame:CGRectMake(160, 10, 2, 24)];
    [work2ChildDiviUIView setBackgroundColor:[UIColor colorWithHexString:@"#fafafa"]];
    [work2ChiledUIView addSubview:work2ChildDiviUIView];
    UILabel *work2ChildMobleLabel = [[UILabel alloc]initWithFrame:CGRectMake(163, 0, 80, 44)];
    [work2ChildMobleLabel setTextColor:[UIColor blackColor]];
    [work2ChildMobleLabel setFont:[UIFont systemFontOfSize:16]];
    [work2ChildMobleLabel setText:@"联系电话:"];
    [work2ChiledUIView addSubview:work2ChildMobleLabel];
    
    UITextView *work2ChildMobleInput =[[UITextView alloc]initWithFrame:CGRectMake(234, 5, 140, 38)];
    [work2ChildMobleInput setTextColor:[UIColor grayColor]];
    [work2ChildMobleInput setFont:[UIFont systemFontOfSize:14]];
    NSLog(@"moble is %@ ",self.personInfoModel.tel2);
    [work2ChildMobleInput setText:self.personInfoModel.tel2];
    self.workMob2TextView=work2ChildMobleInput;
    [work2ChiledUIView addSubview:work2ChildMobleInput];
    
    [self.scrollView addSubview: work2ChiledUIView];
    
    
    
    //work3
    UIView *work3UIView =[[UIView alloc]initWithFrame:CGRectMake(0,648,mainW,44)];
    [work3UIView setBackgroundColor:[UIColor whiteColor]];
    
    UILabel *work3Label = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, 110, 44)];
    [work3Label setTextColor:[UIColor blackColor]];
    [work3Label setFont:[UIFont systemFontOfSize:16]];
    [work3Label setText:@"职位三:"];
    [work3UIView addSubview:work3Label];
    
    UITextView *work3Label2 = [[UITextView alloc]initWithFrame:CGRectMake(120, 5, 300, 40)];
    [work3Label2 setTextColor:[UIColor grayColor]];
    [work3Label2 setFont:[UIFont systemFontOfSize:14]];
    [work3Label2 setText:self.personInfoModel.post3];
    self.workPort3TextView =work3Label2;
    [work3UIView addSubview:work3Label2];
    
    [self.scrollView addSubview: work3UIView];
    
    
    UIView *work3ChiledUIView =[[UIView alloc]initWithFrame:CGRectMake(0,694,mainW,44)];
    [work3ChiledUIView setBackgroundColor:[UIColor whiteColor]];
    UILabel *work3ChildLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, 40, 44)];
    [work3ChildLabel setTextColor:[UIColor blackColor]];
    [work3ChildLabel setFont:[UIFont systemFontOfSize:16]];
    [work3ChildLabel setText:@"姓名:"];
    [work3ChiledUIView addSubview:work3ChildLabel];
    
    UITextView *work3ChiledTextView  = [[UITextView alloc]initWithFrame:CGRectMake(50, 5, 100, 40)];
    [work3ChiledTextView setTextColor:[UIColor grayColor]];
    
    [work3ChiledTextView setFont:[UIFont systemFontOfSize:14]];
    [work3ChiledTextView setText:self.personInfoModel.name3];
    self.workName3TextView = work3ChiledTextView;
    [work3ChiledUIView addSubview:work3ChiledTextView];
    
    UIView *work3ChildDiviUIView  = [[UIView alloc]initWithFrame:CGRectMake(160, 10, 2, 24)];
    [work3ChildDiviUIView setBackgroundColor:[UIColor colorWithHexString:@"#fafafa"]];
    [work3ChiledUIView addSubview:work3ChildDiviUIView];
    UILabel *work3ChildMobleLabel = [[UILabel alloc]initWithFrame:CGRectMake(163, 0, 80, 44)];
    [work3ChildMobleLabel setTextColor:[UIColor blackColor]];
    [work3ChildMobleLabel setFont:[UIFont systemFontOfSize:16]];
    [work3ChildMobleLabel setText:@"联系电话:"];
    [work3ChiledUIView addSubview:work3ChildMobleLabel];
    
    UITextView *work3ChildMobleInput =[[UITextView alloc]initWithFrame:CGRectMake(234, 5, 140, 38)];
    [work3ChildMobleInput setTextColor:[UIColor grayColor]];
    [work3ChildMobleInput setFont:[UIFont systemFontOfSize:14]];
    NSLog(@"moble is %@ ",self.personInfoModel.tel3);
    [work3ChildMobleInput setText:self.personInfoModel.tel3];
    self.workMob3TextView=work3ChildMobleInput;
    [work3ChiledUIView addSubview:work3ChildMobleInput];
    
    [self.scrollView addSubview: work3ChiledUIView];
    
    
    UIView *footerView = [[UIView alloc]initWithFrame:CGRectMake(0, 768, mainW, 80)];
    
    UIButton *footerBtn = [UIButton buttonWithType:UIButtonTypeSystem];
    footerBtn.frame = CGRectMake(mainW/2-60, 20, 120, 35);
    footerBtn.backgroundColor = [UIColor whiteColor];
    [footerBtn setTitle:@"更新个人信息" forState:UIControlStateNormal];
    [footerBtn setBackgroundImage:[UIImage imageNamed:@"button_bg_blue_pre"] forState:UIControlStateNormal];
    [footerBtn setTitleColor:[UIColor whiteColor] forState:(UIControlState)UIControlStateNormal];
    [footerBtn addTarget:(self) action:@selector(updatePersonInfomation:) forControlEvents:(UIControlEventTouchUpInside)];
    
    [footerView addSubview:footerBtn];
    
    [self.scrollView addSubview: footerView];
    //add child view end
    //4.当然了，还得把scrollView添加到视图结构中
    [self.view addSubview: self.scrollView];
    
    [self.scrollView setContentSize:CGSizeMake(mainW, 1000)];
    
}
-(void)updatePersonInfomation:(UIButton *) button{
    NSLog(@"%@",button);
    
    NSMutableDictionary *parameter =[NSMutableDictionary dictionary];
    [parameter setValue:self.personInfoModel.seeeionID forKey:@"sessionid"];
    [parameter setValue:self.fireLabel2.text forKey:@"fhzrr"];
    
    [parameter setValue:self.dutyTextView.text forKey:@"duty"];
    
    [parameter setValue:self.workLevelLabel2.text forKey:@"stationlevel"];
    [parameter setValue:self.workOrderLabel2.text forKey:@"numindept"];
    
    self.personInfoModel.fhzrr =self.fireLabel2.text;
    self.personInfoModel.duty =self.dutyTextView.text;
    self.personInfoModel.stationLevel =self.workLevelLabel2.text;
    self.personInfoModel.numinDept =self.workOrderLabel2.text;
    
    
    [parameter setValue:self.ssqClassLabel.text forKey:@"ssxq"];
    [parameter setValue:self.userClassLabel.text forKey:@"usertype"];
    [parameter setValue:self.addresClassLabel.text forKey:@"address"];
    self.personInfoModel.address =self.addresClassLabel.text;
    self.personInfoModel.USERTYPE =self.userClassLabel.text;
    self.personInfoModel.ssxq =self.ssqClassLabel.text;
    
    [parameter setValue:self.workName1TextView.text forKey:@"name1"];
    [parameter setValue:self.workName2TextView.text forKey:@"name2"];
    [parameter setValue:self.workName3TextView.text forKey:@"name3"];
    
    self.personInfoModel.name1 =self.workName1TextView.text;
    self.personInfoModel.name2 =self.workName2TextView.text;
    self.personInfoModel.name3 =self.workName3TextView.text;
    
    [parameter setValue:self.workMob1TextView.text forKey:@"tel1"];
    [parameter setValue:self.workMob2TextView.text forKey:@"tel2"];
    [parameter setValue:self.workMob3TextView.text forKey:@"tel3"];
    
    self.personInfoModel.tel1 =self.workMob1TextView.text;
    self.personInfoModel.tel2 =self.workMob2TextView.text;
    self.personInfoModel.tel3 =self.workMob3TextView.text;
    
    [parameter setValue:self.workPort1TextView.text forKey:@"post1"];
    [parameter setValue:self.workPort2TextView.text forKey:@"post2"];
    [parameter setValue:self.workPort3TextView.text forKey:@"post3"];
    
    self.personInfoModel.post1 =self.workPort1TextView.text;
    self.personInfoModel.post2 =self.workPort2TextView.text;
    self.personInfoModel.post3 =self.workPort3TextView.text;
    
    [parameter setValue:@"1" forKey:@"status"];
    [parameter setValue:self.personInfoModel.userID forKey:@"userid"];
    [parameter setValue:self.personInfoModel.userName forKey:@"username"];
    [parameter setValue:self.personInfoModel.engUserName forKey:@"engusername"];
    
    
    
    
    
    
    //NSDictionary * parameter = @{@"fhzrr":@"lisi",@"sessionid" : @"1"};
    
    [YQNetworking requestWithUrl:httpAlertPersnolInformationUrl requestType:YQHttpRequestTypePOST refreshRequest:YES cache:NO params:parameter progressBlock:^(int64_t bytesRead, int64_t totalBytes) {
        
    } successBlock:^(id response, NSError *responseInfo) {
        NSError *error;
        
        if (responseInfo.code == 0) {
            [SVProgressHUD showSuccessWithStatus:@"更新成功"];
            
            [NSUserDefaults writeUserDataWithKey:[NSKeyedArchiver archivedDataWithRootObject:self.personInfoModel] forKey:kNSUSERDEFAULT_KEY_USERINFO];
        }else {
            [SVProgressHUD showErrorWithStatus:responseInfo.domain];
        }
        
    } failBlock:^(NSError *error) {
        [SVProgressHUD showSuccessWithStatus:@"更新失败"];
    }];
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
